﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Lecturers/Lecturers.Master" Inherits="System.Web.Mvc.ViewPage<DiplomaWeb.Models.ChangePasswordViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Изменение пароля
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Изменение пароля</h2>

<% if(Model.IsSaved){%>
    <div style="color: green; font-weight: bolder; margin: 10px;">
        Пароль был изменён
    </div>
<% } %>

<% using (Html.BeginRouteForm("Default")) { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <div class="editor-label">
            Старый пароль
        </div>
        <div class="editor-field">
            <%: Html.PasswordFor(model => model.OldPassword)%>
            <%: Html.ValidationMessageFor(model => model.OldPassword) %>
        </div>

        <div class="editor-label">
            Новый пароль
        </div>
        <div class="editor-field">
            <%: Html.PasswordFor(model => model.NewPasswordFirst) %>
            <%: Html.ValidationMessageFor(model => model.NewPasswordFirst) %>
        </div>

        <div class="editor-label">
            Повторите пароль
        </div>
        <div class="editor-field">
            <%: Html.PasswordFor(model => model.NewPasswordSecond)%>
            <%: Html.ValidationMessageFor(model => model.NewPasswordSecond) %>
        </div>

        <p>
            <input type="submit" value="Сохранить" />
        </p>
    </fieldset>
<% } %>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsContent" runat="server">
</asp:Content>
